# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1292190906.453187
_template_filename='/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/people/researcher/view.html'
_template_uri='/derived/people/researcher/view.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['heading']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 2
    ns = runtime.Namespace(u'markup', context._clean_inheritance_tokens(), templateuri=u'/base/markup.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, u'markup')] = ns

def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base/index.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, u'markup')._populate(_import_ns, [u'*'])
        url = _import_ns.get('url', context.get('url', UNDEFINED))
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        session = _import_ns.get('session', context.get('session', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n\n\n')
        # SOURCE LINE 7
        __M_writer(u'\n\n<p>Email: ')
        # SOURCE LINE 9
        __M_writer(escape(c.researcher.email))
        __M_writer(u'</p>\n\n')
        # SOURCE LINE 11
        if c.researcher.affiliation:
            # SOURCE LINE 12
            __M_writer(u' <p>Affiliation: ')
            __M_writer(escape(c.researcher.affiliation))
            __M_writer(u'</p>\n')
            pass
        # SOURCE LINE 14
        __M_writer(u'\n')
        # SOURCE LINE 15
        if c.personalPageContent:
            # SOURCE LINE 16
            __M_writer(u' <div id="userPageContent">\n ')
            # SOURCE LINE 17
            __M_writer(escape(h.literal(c.personalPageContent)))
            __M_writer(u'\n </div>\n')
            pass
        # SOURCE LINE 20
        __M_writer(u'\n')
        # SOURCE LINE 21
        if 'user_username' in session and (session['user_username'] == c.researcher.username or session['user_role'] == 'administrator'): 
            # SOURCE LINE 22
            __M_writer(u'<a href="')
            __M_writer(escape(url(controller='researcher', action='edit', id=c.researcher.id)))
            __M_writer(u'" class="buttonLink" title="Edit this user\'s information">Edit</a>\n<a href="')
            # SOURCE LINE 23
            __M_writer(escape(url(controller='researcher', action='delete', id=c.researcher.id)))
            __M_writer(u'" class="buttonLink" onclick="return confirmDelete(\'User\', \'')
            __M_writer(escape(c.researcher.firstName))
            __M_writer(u' ')
            __M_writer(escape(c.researcher.lastName))
            __M_writer(u'\')" title="Delete this user; confirmation will be required">Delete</a>\n<a href="')
            # SOURCE LINE 24
            __M_writer(escape(url(controller='researcher', action='settings', id=c.researcher.id)))
            __M_writer(u'" class="buttonLink" title="View this user\'s settings">Settings</a>\n')
            pass
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_heading(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'markup')._populate(_import_ns, [u'*'])
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n    <h1 class="heading">')
        # SOURCE LINE 6
        __M_writer(escape(c.researcher.firstName))
        __M_writer(u' ')
        __M_writer(escape(c.researcher.lastName))
        __M_writer(u'</h1>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


